package com.szewec.ps.model.response;

import com.alibaba.fastjson.JSON;

/**
 * 响应对象
 */
public class ResponseData<T> {
    private T data;
    private String msg;
    private Integer code;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public boolean isDataEmpty() {
        return this.data == null || JSON.parseArray(this.data.toString()).size() < 1;
    }
}
